package ru.nosport.matrixaria.modules.common;

/**
 *
 * User: vfabr
 * Date: 20.09.2006
 * Time: 16:02:49
 *
 */
public interface AppServerProcess {

	/**
	 * Start the module.
	 *
	 * @return Successful start state.
	 * @throws Exception when module cannot be started.
	 */
	public boolean moduleStart() throws Exception;

	/**
	 * Stop the module.
	 *
	 * @return Successful stop state. Should be <b>false</b> when module is multithreaded and
	 * any of it's threads are busy.
	 */
	public boolean moduleStop();

	/**
	 * Shows whether module is running. Should be used for multithreaded modules.
	 *
	 * @return <b>True</b> if module has an active thread or has no threads at all.
	 */
	public boolean isModuleRunning();

	/**
	 * Optional method for interactive requests. Displays human-readable module status information.
	 *
	 * @return String with module status description.
	 */
	public String moduleStat();


}
